package bookez.view.util;

public abstract class NumberUtil {
	
	/**
	 * A small wrapper utility for parseInt
	 * @param number - text represents a number
	 * @return the parsed number if success or null if failed.
	 */
	public static Integer parseInt( String number ) {
		Integer result = null;
		
		if ( number == null ) { return null; }
		
		try {
			result = Integer.parseInt( number );
		}
		
		catch ( NumberFormatException nfe ) {
			result = null;
		}
		
		return result;
	}//end method parseInt
	
}//end class NumberUtil
